const MongoClient = require('mongodb').MongoClient;
// const url = "mongodb://taosha_user:apyl8XWP6LSW4JHs@101.35.6.34:27722/taosha";
const url = "mongodb://taosha_user:apyl8XWP6LSW4JHs@101.35.6.34:27722/taosha";

async function main() {
  const client = await MongoClient.connect(url, {useNewUrlParser: true, useUnifiedTopology: true});
  const db = client.db('taosha');


  let result = await db.collection('topics')
    .updateMany(
      {sub_tab: '大厂团队'},
      {$set: {boards: ['大厂团队']}}
    )


  console.log(result.result);


  client.close();

}

main();
